<extend name="Public:base" />
<block name="content">
    <!-- START SLIDER -->
    <div id="slider" class="group inner">
        <ul class="group">
        	<foreach name="goods" item="val3">
        		<if condition="isset($val3['lunbo'])">
		            <li class="first slide-1 group image-content-type">
		                <div class="slider-featured group" style="overflow:hidden;"><a href="/home/goods/detail/index/id/{$val3['id']}"><img src="{$val3['lunbo']}" width="960" height="338" alt="interior design" /></a></div>
		                <div class="slider-caption caption-right">
		                    <!-- TITLE -->
		                    <h2><a href="/home/goods/detail/index/id/{$val3['id']}">{$val3['goods_name']}</a></h2>
		                    <!-- TEXT -->
		                    <p>{$val3['goods_con']}</p>
		                    <p><span class="special-font" style="font-size:24px;">prices from <span style="font-size:42px;">${$val3['goods_price']}</span></span></p>
		                </div>
		            </li>
	            </if>
           	</foreach>
            
        </ul>
    </div>
    <!-- END SLIDER -->            
    <div class="slider-mobile">
        <!-- START SLIDER -->
        <div id="slider" class="group mobile inner fixed-image">
            <img src="__PUBLIC__/home/images/common/001.jpg" width="960" height="338" alt="" />
        </div>
        <!-- END SLIDER -->
        <script type="text/javascript">
            var 	yiw_slider_type = 'elegant',
                    yiw_slider_elegant_easing = null,
        		    yiw_slider_elegant_fx = 'fade',
        		    yiw_slider_elegant_speed = 500,
        		    yiw_slider_elegant_timeout = 5000,
        		    yiw_slider_elegant_caption_speed = 500;
        </script>
     
    </div>
    <!-- START PRIMARY SECTION -->
    <div id="primary" class="inner group">
        <div id="slogan" class="inner">
            <h1>Welcome to Sommerce, a nice and  fresh perspective to your e-commerce site</h1>
            <h3>unlimited layout styles by changing fonts, colors, backgrounds, images and sliders</h3>
        </div>
    <foreach name="vo" item="val1" key='key1'>
    <if condition="$val1['type_name'] neq 商品">
        <div class="layout-sidebar-no">
            <!-- START CONTENT -->
            <div id="content" role="main" class="group wrapper-content">
                <div id="post-7" class="post-7 page type-page status-publish hentry group">
                    <div class="boxed-content group">
                        <div class="box-title group">
                            <h3>{$val1.type_name}</h3>
                            <p>if you enjoy it, visite our market</p>
                        </div>
                        <div class="box-content group">
                            <ul class="products">
							<foreach name="goods" item="val2">
								<if condition="in_array($val1['id'],$val2['position'])">
								<if condition="$i/4 eq 3">
                                	<li class="product border shadow last last-row" style="margin-top:20px">
									<else />
                                	<li class="product border shadow last-row" style="margin-top:20px">
								</if>
                                    <a href="/home/goods/detail/index/id/{$val2['id']}">
                                        <div class="thumbnail">
                                            <img width="150" height="150" src="{$val2['pic']}" class="attachment-shop_small wp-post-image" alt="{$val2['goods_name']}" title="{$val2['goods_name']}" />    			
                                            <div class="thumb-shadow"></div>
                                            <strong class="below-thumb">{$val2['goods_name']}</strong>
                                        </div>
                                        <span class="price">&#36;{$val2['goods_price']}</span>		
                                    </a>
                                    <div class="buttons">
                                        <a href="/home/goods/detail/index/id/{$val2['id']}" class="details">DETAILS</a>&nbsp;<a href="#" info="{$val2.id}" class="add-to-cart">ADD TO CART</a>
                                    </div>
                                </li>
                                </if>
                               </foreach>
                               
                            </ul>
                            <div class="clear"></div>
                        </div>
                    </div>
    			</if>
               </foreach>
                    
                    </div>
                    <div class="call-to-action-two group">
                        <div class="incipit">
                            <p class="special-font">
                                <span style="font-size:52px;"><strong>35% </strong></span> <span style="font-size:48px;">off everything </span>  Sign in to our list before march 21 to enjoy our special sales!<br />
                            </p>
                        </div>
                        <a href="#" class="call-button">
                        SIGN IN NOW		
                        </a>
                    </div>
                </div>
            </div>
            <!-- END CONTENT -->
        </div>
        <!-- START EXTRA CONTENT -->
        <!-- END EXTRA CONTENT -->    
    </div>
    <!-- END PRIMARY SECTION -->
    <script type="text/javascript">
    $(function(){
    	$('.products').each(function(){
    		$(this).find('li').each(function(i){
    			if(i%4==0){
    				$(this).attr('class','product border shadow first last-row');
    			}
    			if(i%4==3){
    				$(this).attr('class','product border shadow last last-row');
    			}
    		});
    	});
    });
    </script>
</block>
